class Animal:
    __type = "动物的类型"
    ethnic = "动物"

    def __init__(self,name,color,sex,ethnic):
        self.__name = name
        self.__color = color
        self.sex = sex
        self.ethnic = ethnic

    def to_String(self):
        print("这是一个{}，它叫{}，是一个{}的{}的小{}".format(self.ethnic,self.__name,self.sex,self.__color,self.ethnic))

    def __speak(self):
        print("动物会叫会说话！！")

    def interface_demo(self):
        self.__speak()

    def introduce(self):
        print("我是动物")

    @classmethod
    def eat(cls):  # cls参数表示类对象
        print("动物要吃饭")

    @staticmethod
    def sleep():
        print("动物要睡觉")

    def fun(self,name,speak,habit):
        print("我是一只动物，我叫{}，我是这样叫的：{}，我喜欢吃{}".format(name,speak,habit))